﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;
using WMS.Model;

namespace WMS.Repository.IRepository
{
    public interface IMenuRepository
    {
        /// <summary>
        /// 获取所有菜单（扁平列表）
        /// </summary>
        Task<List<MenuModel>> GetAllMenusAsync();

        /// <summary>
        /// 获取所有一级菜单
        /// </summary>
        /// <returns></returns>
        public  Task<List<MenuModel>> GetOneMenuList();

        public Task<MenuModel> GetMenuById(long id);

        Task<List<MenuModel>> GetQueryableList();

        Task<List<MenuModel>> GetDynamicRouterListAsync(Expression<Func<MenuModel, bool>> whereExpression);
    }
    public class MenuQueryRequest : PageRequest
    {
        public string? MenuName { get; set; }
        public byte? MenuType { get; set; }
        public bool? IsEnabled { get; set; }
    }

}

